home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / latex209 / contrib / eepic / eepic.sty < prev    next >
Text File  |  1991-01-30  |  17KB  |  470 lines

  1. % eepic Version 1.1b < Febrary 7, 1988 >
  2. %    Written by Conrad Kwok
  3. %
  4. % Internet : kwok@iris.ucdavis.edu
  5. % csnet    : kwok@ucd.csnet
  6. % csnet    : kwok%iris.ucdavis.edu@csnet.relay
  7. % UUCP       : ...!ucbvax!ucdavis!iris!kwok
  8. %
  9. % The macros are in public domain.
  10. % You may distribute or modify it in any ways you like.
  11. % Please report any bugs, enhancements, comments, suggestions, etc.
  12. %
  13. % This style file modify some of the commands in epic[1] and LaTeX[2] such
  14. % that \special commands will be generated in drawing lines if approriate.
  15. % The \special commands generated is the subset of the \specials used
  16. % by tpic[3].
  17. %
  18. % [1] epic is written by Sunil Podar. Please read epic.sty for the
  19. %     copyright notice.
  20. % [2] LaTeX is written by Leslie Lamport. Please read the book LaTeX
  21. % [3] tpic is modified from pic by Tim Morgan
  22. %
  23. %% This file contains extensions of the following epic commands:
  24. %%    \dottedline    \dashline    \drawline
  25. %%    \jput
  26. %%
  27. %% It also contains extensions of the following LaTeX commands:
  28. %%    \circle        \line        \oval
  29. %%
  30. %% New commands include:
  31. %%    \Thicklines    \arc        \ellipse
  32. %%    \path        \spline        \allinethickness
  33. %%
  34. %% New commands for eepic 1.1
  35. %%    \blacken    \whiten        \shade
  36. %%    \texture    \filltype{type} type=black|white|shade
  37. %%
  38. %% For documentation, please see the accompanying manual
  39. %%
  40. %% Change Log;
  41. %% o    (October 2, 88)
  42. %%     Fixed the problem of \line (\@sline). When both x and y are
  43. %%     large, it produced 'bad character code' error.
  44. %%
  45. %% o    (January 17, 89)
  46. %%    Add commands \blacken, \whiten, \shade, \texture
  47. %%
  48. %% o    (January 17, 89)
  49. %%    Add \filltype{xxxxx}
  50. %%    xxxxx - black, white, shade
  51. %%
  52. \typeout{%
  53. Extension to Epic and LaTeX. Version 1.1b - Released Febrary 7, 1988}
  54. %
  55. \newcount\@gphlinewidth
  56. \newcount\@eepictcnt
  57. \newdimen\@tempdimc
  58. \@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736
  59.  
  60. %% Redefine \thinlines, \thicklines
  61. %% See also latex.tex
  62. \def\thinlines{\let\@linefnt\tenln \let\@circlefnt\tencirc
  63.     \@wholewidth\fontdimen8\tenln \@halfwidth .5\@wholewidth
  64.     \@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736\relax}
  65. \def\thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
  66.     \@wholewidth\fontdimen8\tenlnw \@halfwidth .5\@wholewidth
  67.     \@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736
  68.     \advance\@gphlinewidth\@ne   % Make the output looks better
  69.     \relax}
  70. %%
  71. %% To indicate whether the dot character is defined in the dotted join
  72. %%     environment or not (\@ifnodotdef)
  73. \newif\if@nodotdef \global\@nodotdeftrue
  74. %%
  75. %% Redefine \dottedjoin
  76. \def\dottedjoin{\global\@jointhemtrue \global\@joinkind=0\relax
  77.   \bgroup\@ifnextchar[{\global\@nodotdeffalse\@idottedjoin}%
  78.                       {\global\@nodotdeftrue\@idottedjoin[\@empty]}}
  79. %%----------------------------------------------------------------------
  80. %% Redefine \jput
  81. \long\def\jput(#1,#2)#3{\@killglue\raise#2\unitlength\hbox to \z@{\hskip
  82. #1\unitlength #3\hss}%
  83. \if@jointhem \if@firstpoint \gdef\x@one{#1} \gdef\y@one{#2} \global\@firstpointfalse
  84.  \else\ifcase\@joinkind
  85.     \if@nodotdef
  86.         \@spdottedline{\dotgap@join\unitlength}%
  87. (\x@one\unitlength ,\y@one\unitlength)(#1\unitlength,#2\unitlength)
  88.     \else
  89.     \@dottedline[\dotchar@join]{\dotgap@join\unitlength}%
  90. (\x@one\unitlength,\y@one\unitlength)(#1\unitlength,#2\unitlength)
  91.     \fi
  92.     \or\@dashline[\dashlinestretch]{\dashlen@join\unitlength}[\dotgap@join]%
  93. (\x@one,\y@one)(#1,#2)
  94.     \else\@drawline[\drawlinestretch](\x@one,\y@one)(#1,#2)\fi
  95.     \gdef\x@one{#1}\gdef\y@one{#2}%
  96.  \fi
  97. \fi\ignorespaces}
  98. %%
  99. %% Redefine \dottedline to generate special whenever possible.
  100. \def\dottedline{\@ifnextchar [{\@idottedline}{\@ispdottedline}}
  101. %% Similar to \@idottedline but it generate \special
  102. \def\@ispdottedline#1(#2,#3){\@ifnextchar (%
  103. {\@iispdottedline{#1}(#2,#3)}{\relax}}
  104. \def\@iispdottedline#1(#2,#3)(#4,#5){\@spdottedline{#1\unitlength}%
  105. (#2\unitlength,#3\unitlength)(#4\unitlength,#5\unitlength)%
  106. \@ispdottedline{#1}(#4,#5)}
  107. %
  108. \def\@spdottedline#1(#2,#3)(#4,#5){%
  109.     \@tempcnta \@gphlinewidth\relax
  110.     \advance\@tempcnta by 2     % solely for better output
  111.     \special{pn \the\@tempcnta}%
  112.     \@tempdimc=#2\relax
  113.     \@tempcnta \@tempdimc\relax \advance\@tempcnta 2368 \divide\@tempcnta 4736
  114.     \@tempdimc=#3\relax
  115.     \@tempcntb -\@tempdimc\relax\advance\@tempcntb -2368 \divide\@tempcntb 4736
  116.     \@paspecial{\the\@tempcnta}{\the\@tempcntb}%
  117.     \@tempdimc=#4\relax
  118.     \@tempcnta \@tempdimc\relax \advance\@tempcnta 2368 \divide\@tempcnta 4736
  119.     \@tempdimc=#5\relax
  120.     \@tempcntb -\@tempdimc\relax\advance\@tempcntb -2368 \divide\@tempcntb 4736
  121.     \@paspecial{\the\@tempcnta}{\the\@tempcntb}%
  122.     \@tempdimc=#1\relax
  123. %%
  124. %% Generate the pen width in terms of inch with 3 decimal digit.
  125.     \@tempcnta \@tempdimc\relax \advance\@tempcnta 2368 \divide\@tempcnta 4736
  126. %% \@tempcnta contain the pen width in terms of thousandth of a inch
  127. %% Then it is converted back to inch. I know the way I use is dumb but
  128. %% I cannot think of any better method
  129.     \@tempcntb \@tempcnta\relax \divide\@tempcntb 1000
  130.     \multiply \@tempcntb 1000 \advance\@tempcnta -\@tempcntb
  131.     \divide\@tempcntb 1000
  132.     \ifnum\@tempcnta < 10
  133.         \special{dt \the\@tempcntb.00\the\@tempcnta}%
  134.     \else\ifnum\@tempcnta < 100
  135.         \special{dt \the\@tempcntb.0\the\@tempcnta}%
  136.     \else
  137.         \special{dt \the\@tempcntb.\the\@tempcnta}%
  138.     \fi\fi
  139.     \ignorespaces
  140. }
  141. %
  142. \def\@iiidashline[#1]#2[#3](#4,#5)(#6,#7){%
  143. \@dashline[#1]{#2\unitlength}[#3](#4,#5)(#6,#7)%
  144. \@iidashline[#1]{#2}[#3](#6,#7)}
  145. %
  146. %% Redefine \@dashline
  147. \long\def\@dashline[#1]#2[#3](#4,#5)(#6,#7){{%
  148. \x@diff=#6\unitlength \advance\x@diff by -#4\unitlength
  149. \y@diff=#7\unitlength \advance\y@diff by -#5\unitlength
  150. %% correction to get actual width since the dash-length as taken in arguement
  151. %% is the center-to-center of the end-points.
  152. \@tempdima=#2\relax \advance\@tempdima -\@wholewidth
  153. \sqrtandstuff{\x@diff}{\y@diff}{\@tempdima}%
  154. \ifnum\num@segments <3 \num@segments=3\fi% min number of dashes I can plot
  155. % is 2, 1 at either end, thus min num@segments is 3 (including 'empty dash').
  156. \@tempdima=\x@diff \@tempdimb=\y@diff
  157. \divide\@tempdimb by\num@segments
  158. \divide\@tempdima by\num@segments
  159. %% ugly if-then-else. If optional dotgap specified, then use it otherwise
  160. %% make a solid dash.
  161. {\ifx#3\@empty \relax
  162.     \ifdim\@tempdima < 0pt \x@diff=-\@tempdima\else\x@diff=\@tempdima\fi
  163.     \ifdim\@tempdimb < 0pt \y@diff=-\@tempdimb\else\y@diff=\@tempdimb\fi
  164.     \global\setbox\@dotbox\hbox{%
  165.                 \@absspdrawline(0pt,0pt)(\@tempdima,\@tempdimb)}%
  166.     \else\global\setbox\@dotbox\hbox{%
  167.         \@spdottedline{#3\unitlength}(0pt,0pt)(\@tempdima,\@tempdimb)}%
  168.     \fi}%
  169. \advance\x@diff by -\@tempdima % both have same sign
  170. \advance\y@diff by -\@tempdimb
  171. %
  172. %%here we correct the number of dashes to be put by reducing them
  173. %%appropriately. (num@segments*\@wholewidth) is in some way the slack we
  174. %%have,and division by dash-length gives the reduction. reduction =
  175. %%(2*num@segments*\@wholewidth)/dash-length
  176. %% (num@segments includes empty ones)
  177. \@tempdima=\num@segments\@wholewidth \@tempdima=2\@tempdima
  178. \@tempcnta\@tempdima\relax \@tempdima=#2\relax \@tempdimb=0.5\@tempdima
  179. \@tempcntb\@tempdimb\relax \advance\@tempcnta by \@tempcntb % round-off error
  180. \divide\@tempcnta by\@tempdima \advance\num@segments by -\@tempcnta
  181. %
  182. \ifnum #1=0 \relax\else\ifnum #1 < -100
  183.   \typeout{***dashline: reduction > -100 percent implies blankness!***}
  184. \else\num@segmentsi=#1 \advance\num@segmentsi by 100
  185.      \multiply\num@segments by\num@segmentsi \divide\num@segments by 100
  186. \fi\fi
  187. %
  188. \divide\num@segments by 2 % earlier num@segments included 'empty dashes' too.
  189. \ifnum\num@segments >0 % if =0 then don't divide => \x@diff & \y@diff
  190.  \divide\x@diff by\num@segments%   remain same.
  191.  \divide\y@diff by\num@segments
  192.  \advance\num@segments by\@ne %for the last segment for which I subtracted
  193.                   %\@tempdima & \@tempdimb from \x@diff & \y@diff
  194.  \else\num@segments=2 % one at each end.
  195. \fi
  196. %%\typeout{num@segments finally = \the\num@segments}
  197. %% equiv to \multiput(#4,#5)(\x@diff,\y@diff){\num@segments}{\copy\@dotbox}
  198. %% with arguements in absolute dimensions.
  199. \@xdim=#4\unitlength \@ydim=#5\unitlength
  200. \@killglue
  201. \loop \ifnum\num@segments > 0
  202. \unskip\raise\@ydim\hbox to\z@{\hskip\@xdim \copy\@dotbox\hss}%
  203. \advance\num@segments \m@ne\advance\@xdim\x@diff\advance\@ydim\y@diff%
  204. \repeat}%
  205. \ignorespaces}
  206. %% redefine \@drawline
  207. %
  208. \def\@drawline[#1](#2,#3)(#4,#5){{%
  209. \@drawitfalse\@horvlinefalse
  210. \ifnum#1 <0 \relax\else\@horvlinetrue\fi
  211. \if@horvline
  212.  \@spdrawline(#2,#3)(#4,#5)
  213. \else\@drawittrue\fi
  214. %%-------------------------------
  215. \if@drawit
  216. \ifnum #1=0 \relax \else\ifnum #1 < -99
  217.   \typeout{***drawline: reduction <= -100 percent implies blankness!***}%
  218. \else\num@segmentsi=#1 \advance\num@segmentsi by 50
  219.      \multiply\num@segmentsi 2
  220. \fi\fi
  221. \@dashline[\num@segmentsi]{10pt}[\@empty](#2,#3)(#4,#5)
  222. \fi}\ignorespaces}% for \if@drawit
  223. %
  224. \def\@spdrawline(#1,#2)(#3,#4){%
  225.    \@absspdrawline(#1\unitlength,#2\unitlength)(#3\unitlength,#4\unitlength)
  226.    \ignorespaces
  227. }
  228. \def\@absspdrawline(#1,#2)(#3,#4){%
  229.     \special{pn \the\@gphlinewidth}%
  230.     \@tempdimc=#1\relax
  231.     \@tempcnta \@tempdimc\relax \advance\@tempcnta 2368 \divide\@tempcnta 4736
  232.     \@tempdimc=#2\relax
  233.     \@tempcntb -\@tempdimc\relax \advance\@tempcntb -2368 \divide\@tempcntb 4736
  234.     \@paspecial{\the\@tempcnta}{\the\@tempcntb}%
  235.     \@tempdimc=#3\relax
  236.     \@tempcnta\@tempdimc\relax \advance\@tempcnta 2368 \divide\@tempcnta 4736
  237.     \@tempdimc=#4\relax
  238.     \@tempcntb -\@tempdimc\relax \advance\@tempcntb -2368 \divide\@tempcntb 4736
  239.     \@paspecial{\the\@tempcnta}{\the\@tempcntb}%
  240.     \special{fp}%
  241.     \ignorespaces
  242. }
  243. %%----------------------------------------------------------------------
  244. \def\@paspecial#1#2{%
  245.     \special{pa #1 #2}%
  246. }
  247. %%
  248. %% Functions below modify the LaTeX commands and some additional commands
  249. %% are not supported by LaTeX nor epic such as ThickLines and arc.
  250. %%
  251. %% The macros are for use with LaTeX picture environment
  252. %% By including the macro file, you can draw
  253. %%   1) \line in any slope
  254. %%   2) \circle with any radius
  255. %%   3) \ellipse with any x-axis and y-axis length
  256. %%   4) Circular \arc by giving starting and ending angle (in radius)
  257. %%
  258. %% Furthermore you may draw lines in any thickness.
  259. %%
  260. %%
  261. %% Redefine \thinlines, \thicklines and define \Thickline
  262. %% See also latex.tex
  263. \def\Thicklines{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
  264.     \@wholewidth\fontdimen8\tenlnw \@wholewidth 1.5\@wholewidth
  265.     \@halfwidth .5\@wholewidth
  266.     \@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736\relax}
  267. %%
  268. %% Generate the \special command for drawing arc
  269. \def\@circlespecial#1#2#3#4{%
  270.           \special{pn \the\@gphlinewidth}%
  271.           \special{ar 0 0 #1 #2 #3 #4}
  272. }
  273. %%
  274. %% Command for drawing an arc. Elliptical arc command can be generated
  275. %% but all iptex program I saw so far does not support that.
  276. \def\@arc#1#2#3#4{%
  277. %% convert TeX dimension to length in terms thousandth of an inch
  278.     \@tempdima #1\unitlength
  279.     \@tempdimb #2\unitlength
  280.         \@tempcnta\@tempdima \advance\@tempcnta 4736 \divide\@tempcnta 9473
  281.     \@tempcntb\@tempdimb \advance\@tempcntb 4736 \divide\@tempcntb 9473
  282.     \setbox\@tempboxa\hbox{%
  283.         \@circlespecial{\the\@tempcnta}{\the\@tempcntb}{#3}{#4}}%
  284.         \wd\@tempboxa\z@ \box\@tempboxa}
  285. %%
  286. %% Command for drawing Circle and Ellipse in terms of \@arc
  287. %% replace original \circle
  288. \def\circle{%
  289.     \@ifstar{\copy\@filltype\@circle}{\@circle}}
  290. \def\@circle#1{\@arc{#1}{#1}{0}{6.2832}}
  291. \def\ellipse{%
  292.     \@ifstar{\copy\@filltype\@ellipse}{\@ellipse}}
  293. \def\@ellipse#1#2{{\@arc{#1}{#2}{0}{6.2832}}}
  294. \def\arc#1#2#3{\@arc{#1}{#1}{#2}{#3}}
  295. %%
  296. %% Generate \special commands for drawing line
  297. \def\@linespecial#1#2{%
  298.           \special{pn \the\@gphlinewidth}%
  299.           \special{pa 0 0}%
  300.           \special{pa #1 #2}%
  301.           \special{fp}%
  302. }
  303. %% Replace original \line. Only change is to call \@ssline instead
  304. %% of \@sline. For description, see latex.tex
  305. \def\line(#1,#2)#3{\@xarg #1\relax \@yarg #2\relax
  306. \@linelen=#3\unitlength
  307. \ifnum\@xarg =0 \@vline 
  308.   \else \ifnum\@yarg =0 \@hline \else \@ssline\fi
  309. \fi}
  310. %%
  311. \def\@ssline{%
  312.     \ifnum\@xarg< 0
  313.       \@negargtrue \@xarg -\@xarg \@tempdima -\@linelen
  314.     \else
  315.       \@negargfalse \@tempdima\@linelen
  316.     \fi
  317. %% truncation is used in arithmetic
  318.     \@tempcnta\@linelen \divide\@tempcnta 4736
  319.         \@yyarg -\@yarg \multiply\@yyarg \@tempcnta \divide\@yyarg\@xarg
  320.      \if@negarg
  321.         \@tempcnta -\@tempcnta
  322.     \fi
  323.     \setbox\@linechar\hbox{\@linespecial{\the\@tempcnta}{\the\@yyarg}}%
  324.     \wd\@linechar\@tempdima
  325.     \@clnht\@linelen
  326.         \multiply\@clnht\@yarg
  327.         \divide\@clnht\@xarg
  328.     \ifnum\@yarg< 0
  329.       \@clnht -\@clnht
  330.       \ht\@linechar\z@ \dp\@linechar\@clnht
  331.     \else
  332.       \ht\@linechar\@clnht \dp\@linechar\z@
  333.     \fi
  334.     \box\@linechar
  335. }
  336. %%
  337. %% Replace original \@sline
  338. \def\@sline{%
  339.     \@ssline
  340. %% Codes below (till end of the command) is only necessary
  341. %% when used with \@svector
  342.     \if@negarg
  343.       \@yyarg -\@yarg
  344.     \else
  345.       \@yyarg \@yarg
  346.     \fi
  347.     \setbox\@linechar\hbox{\@linefnt\@getlinechar(\@xarg,\@yyarg)}%
  348.     \ifnum\@yarg> 0
  349.       \let\@upordown\raise
  350.       \advance\@clnht -\ht\@linechar
  351.     \else
  352.       \let\@upordown\lower
  353.     \fi
  354.     \if@negarg \kern\wd\@linechar \fi
  355. }
  356. %%
  357. \def\spline(#1,#2){%
  358.     \special{pn \the\@gphlinewidth}%
  359.     \@spline(#1,#2)%
  360. }
  361. \def\@spline(#1,#2){%
  362.     \@tempdima #1\unitlength
  363.     \@tempdimb #2\unitlength
  364.     \@tempcnta \@tempdima \advance\@tempcnta 2368 \divide\@tempcnta 4736
  365.     \@tempcntb -\@tempdimb \advance\@tempcntb -2368 \divide\@tempcntb 4736
  366.     \@paspecial{\the\@tempcnta}{\the\@tempcntb}%
  367.     \@ifnextchar ({\@spline}{\special{sp}}%
  368. }
  369. \def\path(#1,#2){%
  370.     \special{pn \the\@gphlinewidth}%
  371.     \@path(#1,#2)%
  372. }
  373. \def\@path(#1,#2){%
  374.     \@tempdima #1\unitlength
  375.     \@tempdimb #2\unitlength
  376.     \@tempcnta \@tempdima \advance\@tempcnta 2368 \divide\@tempcnta 4736
  377.     \@tempcntb -\@tempdimb \advance\@tempcntb -2368 \divide\@tempcntb 4736
  378.     \@paspecial{\the\@tempcnta}{\the\@tempcntb}%
  379.     \@ifnextchar ({\@path}{\special{fp}}%
  380. }
  381.  
  382. %%%%%%%%%% Beginning of \oval %%%%%%%%%%%%%%%
  383. \newdimen\maxovaldiam \maxovaldiam 40pt\relax
  384.  
  385. \def\@oval(#1,#2)[#3]{\begingroup\boxmaxdepth \maxdimen
  386.   \@ovttrue \@ovbtrue \@ovltrue \@ovrtrue
  387.   \@tfor\@tempa :=#3\do{\csname @ov\@tempa false\endcsname}\@ovxx
  388.   #1\unitlength \@ovyy #2\unitlength
  389.   \@tempdimb \ifdim \@ovyy >\@ovxx \@ovxx\else \@ovyy \fi
  390.   \@ovro \ifdim \@tempdimb>\maxovaldiam \maxovaldiam\else\@tempdimb\fi\relax
  391.   \divide \@ovro \tw@
  392.   \@ovdx\@ovxx \divide\@ovdx \tw@
  393.   \@ovdy\@ovyy \divide\@ovdy \tw@
  394.   \setbox\@tempboxa \hbox{%
  395.   \if@ovr \@ovverta\fi
  396.   \if@ovl \kern \@ovxx \@ovvertb\kern -\@ovxx \fi
  397.   \if@ovt \@ovhorz \kern -\@ovxx \fi
  398.   \if@ovb \raise \@ovyy \@ovhorz \fi}
  399.   \ht\@tempboxa\z@ \dp\@tempboxa\z@
  400.   \@put{-\@ovdx}{-\@ovdy}{\box\@tempboxa}%
  401.   \endgroup}
  402.  
  403. \def\@qcirc#1#2#3#4{%
  404.     \special{pn \the\@gphlinewidth}%
  405.     \@eepictcnt \@gphlinewidth \divide\@eepictcnt 2
  406.     \@tempcnta #1 
  407.       \advance\@tempcnta 2368 \divide\@tempcnta 4736
  408.       \advance\@tempcnta\@eepictcnt
  409.     \@tempcntb #2 \divide\@tempcntb 4736 \advance\@tempcntb 2
  410.     \hbox{%
  411.         \@qcircspecial{\the\@tempcnta}{-\the\@eepictcnt}{\the\@tempcntb}{#3}{#4}}%
  412. }
  413. \def\@qcircspecial#1#2#3#4#5{\special{ar #1 #2 #3 #3 #4 #5}}
  414.  
  415. \def\@ovverta{\vbox to \@ovyy{%
  416.     \if@ovb
  417.         \kern \@ovro
  418.         \@qcirc{\@ovro}{\@ovro}{3.1416}{4.7124}\nointerlineskip
  419.     \else
  420.         \kern \@ovdy
  421.     \fi
  422.     \leaders\vrule width \@wholewidth\vfil \nointerlineskip
  423.     \if@ovt
  424.         \@qcirc{\@ovro}{\@ovro}{1.5708}{3.1416}\nointerlineskip
  425.         \kern \@ovro
  426.     \else
  427.         \kern \@ovdy
  428.     \fi
  429. }\kern -\@wholewidth}
  430.  
  431. \def\@ovvertb{\vbox to \@ovyy{%
  432.     \if@ovb
  433.         \kern \@ovro
  434.         \@qcirc{-\@ovro}{\@ovro}{4.6124}{6.2832}\nointerlineskip
  435.     \else
  436.         \kern \@ovdy
  437.     \fi
  438.     \leaders\vrule width \@wholewidth\vfil \nointerlineskip
  439.     \if@ovt
  440.         \@qcirc{-\@ovro}{\@ovro}{0}{1.6708}\nointerlineskip
  441.         \kern \@ovro
  442.     \else
  443.         \kern \@ovdy
  444.     \fi
  445. }\kern -\@wholewidth}
  446.  
  447. \def\@ovhorz{\hbox to \@ovxx{%
  448.     \if@ovr \kern \@ovro\else \kern \@ovdx \fi
  449.     \leaders \hrule height \@wholewidth \hfil
  450.     \if@ovl \kern \@ovro\else \kern \@ovdx \fi
  451.     }}
  452. %%%%%%%%% End of \oval %%%%%%%%%%%%%%
  453.  
  454. \def\allinethickness#1{\let\@linefnt\tenlnw \let\@circlefnt\tencircw
  455.     \@wholewidth #1 \@halfwidth .5\@wholewidth
  456.     \@gphlinewidth\@wholewidth \divide\@gphlinewidth 4736\relax}
  457.  
  458. \def\blacken{\special{bk}}
  459. \def\whiten{\special{wh}}
  460. \def\shade{\special{sh}}
  461. \def\texture#1{\special{tx #1}\ignorespaces}
  462. %% 
  463. \newbox\@filltype
  464. \setbox\@filltype\hbox{\special{bk}}
  465. \def\filltype#1{\@nameuse{ft@#1}}
  466. \def\ft@black{\setbox\@filltype\hbox{\special{bk}}}
  467. \def\ft@white{\setbox\@filltype\hbox{\special{wh}}}
  468. \def\ft@shade{\setbox\@filltype\hbox{\special{sh}}}
  469. %%
  470.